package cn.wolfcode.luowowo.member.service;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import cn.wolfcode.luowowo.member.exception.LogicException;

import java.util.List;

//用户服务接口
public interface IUserInfoService {
    /**
     * 查单个用户
     *
     * @param id
     * @return
     */
    UserInfo getUserInfo(Long id);

    /**
     * 验证是否是唯一手机号
     *
     * @param phone
     * @return
     */
    boolean getPhone(String phone);

    /**
     * 获取验证码
     *
     * @param phone
     * @return
     */
    String sendVerifyCode(String phone);

    /**
     * 用户的注册
     *
     * @param phone
     * @param nickname
     * @param password
     * @param rpassword
     * @param verifyCode
     * @throws LogicException
     */
    void userRedis(String phone, String nickname, String password, String rpassword, String verifyCode) throws LogicException;

    /**
     * 用户的登录
     * @param username
     * @param password
     */
    String userLogin(String username, String password)throws LogicException;


    List<UserInfo> list();

}

